@import '../../../styles/var';
@import './confirm';

@modal: ~'@{prefix}-modal';
@button: ~'@{prefix}-button';
@icon: ~'@{prefix}-icon';

.@{modal}-root {
}

.@{modal}-mask,
.@{modal}-wrap {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.@{modal}-wrap {
  overflow: auto;
  transform-origin: center 0;
}

.@{modal}-mask {
  background-color: @mask-background;

  &.@{modal}-mask-hidden {
    display: none;
  }
}

.@{modal} {
  line-height: 20px;
  position: relative;
  top: 100px;
  margin: 0 auto;
  font-family: @font-family;
  color: @font-color;
  font-size: 14px;
}

.@{modal}-content {
  min-height: 40px;
  background-color: @component-background;
  box-shadow: @modal-shadow-lighter;
}

.@{modal}-close {
  cursor: pointer;
  position: absolute;
  top: 0;
  right: 0;
  padding: 10px;
  font-size: 20px;
  color: @symbol-color;

  &:focus {
    outline: none;
    color: @secondary-color;

    .@{icon} {
      box-shadow: @focus-shadow-secondary;
    }
  }

  &:hover {
    color: @secondary-color;
  }

  &:active {
    color: @secondary-darker-color;
  }
}

.@{modal}-header {
  padding: 10px;

  &:empty {
    display: none;
  }
}

.@{modal}-title {
  font-size: 16px;
}

.@{modal}-body {
  padding: 10px;
}

.@{modal}-footer {
  padding: 10px;
  text-align: right;

  &:empty {
    display: none;
  }

  .@{button} + .@{button} {
    margin-left: 10px;
  }
}
